package com.medusa.aps.business.modules.basic.mp.entity;

import cn.hutool.core.annotation.Alias;
import com.baomidou.mybatisplus.annotation.*;
import com.medusa.aps.business.model.BaseEntity;
import com.medusa.aps.business.model.enums.SourceEnum;
import com.medusa.aps.business.model.enums.State;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serial;


@Getter
@Setter
@Accessors(chain = true)
@TableName("workshop")
public class Workshop extends BaseEntity<Workshop> {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @Schema(description = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 车间名称
     */
    @Schema(description = "车间名称")
    private String workshopName;

    /**
     * 车间编码
     */
    @Schema(description = "车间编码")
    private String workshopCode;

    /**
     * 用户id
     */
    @Schema(description = "用户id")
    private Long userId;

    /**
     * 车间负责人
     */
    @Alias("车间负责人")
    @Schema(description = "车间负责人")
    private String workshopLeader;

    /**
     * 联系电话
     */
    @Alias("联系电话")
    @Schema(description = "联系电话")
    private String contactNumber;

    /**
     * 员工工号
     */
    @Alias("员工工号")
    @TableField("job_number")
    @Schema(description = "员工工号")
    private String jobNumber;


    /**
     * 数据来源
     */
    @Schema(description = "数据来源")
    private SourceEnum dataSource;

    /**
     * 启用状态
     */
    @Alias("状态")
    private State state;


    /**
     * 创建人
     */
    @Schema(description = "创建人")
    @TableField(fill = FieldFill.INSERT)
    private String creator;

}
